package com.ywjt.pinkelephant.my.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ywjt.pinkelephant.R;
import com.ywjt.pinkelephant.my.model.PeyMethodModel;

import java.util.List;

public class VipPayMentAdapter extends BaseQuickAdapter<PeyMethodModel, BaseViewHolder> {

    public VipPayMentAdapter(@Nullable List<PeyMethodModel> data) {
        super(R.layout.item_paymethod, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PeyMethodModel item) {
helper.setText(R.id.tvPayMethod,item.getPayname());
        ImageView ivSelect=helper.getView(R.id.ivSelect);
        ImageView ivLogo=helper.getView(R.id.ivLogo);
        if (item.getSelect()) {
            ivSelect.setImageResource(R.mipmap.icon_selected);
        }else {
            ivSelect.setImageResource(R.mipmap.icon_unselected);
        }

        ivLogo.setImageResource(item.getPaylogo());
    }
}
